package com.shasselclub.project.ask.datiRecord.mapper;

import java.util.List;
import java.util.Map;

import com.shasselclub.api.v1.result.PaiHangBang;
import com.shasselclub.api.v1.result.PaiHangBangExportBo;
import com.shasselclub.project.ask.datiRecord.domain.DatiRecord;

/**
 * 答题记录Mapper接口
 * 
 * @author zhengyunfei
 * @date 2022-08-08
 */
public interface DatiRecordMapper 
{
    /**
     * 查询答题记录
     * 
     * @param id 答题记录主键
     * @return 答题记录
     */
    public DatiRecord selectDatiRecordById(Long id);

    /**
     * 查询答题记录列表
     * 
     * @param datiRecord 答题记录
     * @return 答题记录集合
     */
    public List<DatiRecord> selectDatiRecordList(Map<String,Object> queryMap);

    /**
     * 新增答题记录
     * 
     * @param datiRecord 答题记录
     * @return 结果
     */
    public int insertDatiRecord(Map<String,Object> queryMap);

    /**
     * 修改答题记录
     * 
     * @param datiRecord 答题记录
     * @return 结果
     */
    public int updateDatiRecord(Map<String,Object> queryMap);

    /**
     * 删除答题记录
     * 
     * @param id 答题记录主键
     * @return 结果
     */
    public int deleteDatiRecordById(Long id);

    /**
     * 批量删除答题记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDatiRecordByIds(String[] ids);

    String getMaxId(Map<String, Object> queryMap);

    int count(Map<String, Object> parameterMap);

    int getSumScore(Map<String, Object> scoreQueryMap);

    List<PaiHangBang> getPangHangPang(Map<String, Object> hdQueryMap);

    PaiHangBang getRankNumAndSumScore(Map<String, Object> hdQueryMap);
    PaiHangBang getMyPaiHang(Map<String, Object> hdQueryMap);

    int getAnswerNum(Map<String, Object> scoreQueryMap);
    int getRankNum(Map<String, Object> scoreQueryMap);

    int getZhuLiNum(Map<String, Object> hdQueryMap);

    DatiRecord getMaxScroreRecord(Map<String, Object> parameterMap);

    int updateMaxScoreRecord(Map<String, Object> updateMaxScoreRecordMap);

    int updateNotMaxScoreRecord(Map<String, Object> updateNotMaxScoreRecordMap);

    int getLastScore(Map<String, Object> parameterMap);

    List<PaiHangBangExportBo> getLastPaiHangList(Map<String, Object> hdQueryMap);
}
